package com.blb.community.controller;

import com.blb.community.pojo.ResponseResult;
import com.blb.community.pojo.ZyCommunity;
import com.blb.community.service.IZyCommunityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 小区  前端控制器
 * </p>
 *
 * @author gch
 * @since 2023-12-05
 */
@CrossOrigin
@RestController
public class ZyCommunityController {
    @Autowired
    private IZyCommunityService zyCommunityService;

    @GetMapping("/zyCommunity")
    public ResponseResult<List<ZyCommunity>> get() {
        List<ZyCommunity> list = zyCommunityService.list();
        return ResponseResult.ok(list);
    }
}
